<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改我的密码</title>
<link rel=stylesheet type=text/css href="css/input.css">
<style type="text/css">
	body{
		background:#dae4fe;
	}
	.td{
		text-align:right;
	}
	label{
		color:red;
	}
	.one1{
		font-size:14px;
		font-weight:bold;
		margin:5px;
	}
</style>
<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
<script>
	function chongzhi(){
		location.reload();
	}
	$(function(){
		$(".def").click(function(){
			var uname = $("#uname").val();
			var glypass = $("#glypass").val();
			var newglypass = $("#newglypass").val();
			alert(newglypass);
			$.post("updatepass",{uname:uname,glypass:glypass,newglypass:newglypass},function(v){
				$("#label1").html(v);
			});
		});
	});
</script>
</head>
<body>
	<div class="one1">
		管理员管理->修改我的密码
		<hr>
	</div>
	<form action="">
		<table>
			<tr>
				<td class="td">管理员姓名：</td>
				<td><input readonly="readonly" id="uname" name="uname" value="${sessionscope.uName}"></td>
			</tr>
			<tr>
				<td class="td">原始密码：</td>
				<td><input type="password" id="glypass" name="glypass"></td>
			</tr>
			<tr>
				<td class="td">新密码：</td>
				<td><input type="password" id="newglypass" name="newglypass"></td>
			</tr>
			<tr>
				<td class="td">
					<a class="def" href="javascript:void(0)">
						<input type="button" value="修   改">
					</a>
				</td>
				<td><input onclick="chongzhi()" type="button" value="重   置"></td>
			</tr>
		</table>
		<label id="label1"></label>
	</form>
</body>
</html>